package com.offcn.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.offcn.pojo.Order;
import com.offcn.service.OrderService;
import com.offcn.utils.Result;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: wy
 * @Date: 2022/9/2 10:48
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Reference
    private OrderService orderService;
    private Result result;

    //预约订单
    @RequestMapping("submitOrder")
    public Result submitOrder(@RequestBody Map map){
        return orderService.submitOrder(map);
    }


    //根据订单id 查询订单的方法
    @RequestMapping("findOrderById")
    public  Map<String,Object>  findOrderById(Integer id){

        Map<String,Object> map=orderService.findOrderById(id);
        return map;
    }

}
